package com.bigmi.admin.controller;

import com.bigmi.admin.service.AdWmService;
import com.bigmi.model.admin.dto.AdWmUserDto;
import com.bigmi.model.common.dtos.PageRequestDto;
import com.bigmi.model.common.dtos.ResponseResult;
import com.bigmi.model.wemedia.pojos.WmUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/api/v1/auth")
public class AdWmController {
    @Autowired
    private AdWmService adWmService;

    /**
     * 自媒体人查询
     * @param adWmUserDto
     * @return
     */
    @PostMapping("/list")
    public ResponseResult saw(@RequestBody AdWmUserDto adWmUserDto){
        System.out.println(adWmUserDto);
        return adWmService.saw(adWmUserDto);
    }

    /**
     * 修改自媒体人状态
     * @param wmUser
     * @return
     */
    @PostMapping("/authPass")
    public ResponseResult upData(@RequestBody WmUser wmUser){
        return adWmService.upData(wmUser);
    }
}
